﻿<UserControl x:Name="TopContainer"
			 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
			 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
			 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
			 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"    				    	 
			 xmlns:dashboard="clr-namespace:Ewav"
			 xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" 
			 xmlns:GadgetSelector="clr-namespace:Ewav.ContextMenu;assembly=Ewav.ContextMenu.Menu"
			 xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" 
			 x:Class="Ewav.DashboardMainPage"
			 mc:Ignorable="d"
			 d:DesignHeight="300" d:DesignWidth="1024" >
    <UserControl.Resources>
        <Style x:Key="PathStyle1" TargetType="Path">
            <Setter Property="Fill">
                <Setter.Value>
                    <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
                        <LinearGradientBrush.RelativeTransform>
                            <TransformGroup>
                                <TranslateTransform X="-0.5" Y="-0.5"/>
                                <ScaleTransform ScaleX="0.42070697804067081" 

										ScaleY="0.42070697804067081"/>
                                <SkewTransform AngleX="0" AngleY="0"/>
                                <RotateTransform Angle="-278.63046519289236"/>
                                <TranslateTransform X="0.5" Y="0.5"/>
                                <TranslateTransform X="-0.02811997223844305" Y="-0.28845321875685026"/>
                            </TransformGroup>
                        </LinearGradientBrush.RelativeTransform>
                        <GradientStop Color="sc#0.7, 1, 1, 1" Offset="0"/>
                        <GradientStop Color="sc#0.2, 1, 1, 1" Offset="1"/>
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
        </Style>

        <Storyboard x:Name="Storyboard1">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="grdDash" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" >
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="00:00:0.4" Value="-1060">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CubicEase EasingMode="EaseIn"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="grdDash" Storyboard.TargetProperty="(UIElement.Visibility)" BeginTime="00:00:00">
                <DiscreteObjectKeyFrame KeyTime="00:00:0.2">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Collapsed</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
            </ObjectAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="grdAdmin" Storyboard.TargetProperty="(UIElement.Visibility)" BeginTime="00:00:00">
                <DiscreteObjectKeyFrame KeyTime="00:00:0.2">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Visible</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
            </ObjectAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="grdAdmin" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" >
                <EasingDoubleKeyFrame KeyTime="0" Value="2060"/>
                <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CubicEase EasingMode="EaseOut"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="Storyboard2">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="grdAdmin" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" >
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="00:00:0.4" Value="2060">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CubicEase EasingMode="EaseIn"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="grdAdmin" Storyboard.TargetProperty="(UIElement.Visibility)" BeginTime="00:00:00" >
                <DiscreteObjectKeyFrame KeyTime="00:00:0.2">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Collapsed</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
            </ObjectAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="grdDash" Storyboard.TargetProperty="(UIElement.Visibility)" BeginTime="00:00:00">
                <DiscreteObjectKeyFrame KeyTime="00:00:0.2">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Visible</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
            </ObjectAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="grdDash" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" >
                <EasingDoubleKeyFrame KeyTime="0" Value="-1060"/>
                <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CubicEase EasingMode="EaseOut"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="Shrink">
            <DoubleAnimation Storyboard.TargetName="spButtons" Storyboard.TargetProperty="Height" From="228" To="0" Duration="00:00:00.5" />
            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="spButtons" Storyboard.TargetProperty="(UIElement.Visibility)" BeginTime="00:00:00">
                <DiscreteObjectKeyFrame KeyTime="00:00:00.9">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Collapsed</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="Grow">
            <DoubleAnimation Storyboard.TargetName="spButtons" Storyboard.TargetProperty="Height" From="0" To="228" Duration="00:00:00.5" />
        </Storyboard>
    </UserControl.Resources>
    <!--<ScrollViewer x:Name="scrollViewer" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" Background="Transparent" Margin="0" Padding="0">-->

    <Grid x:Name="LayoutRoot" MouseRightButtonDown="LayoutRoot_MouseRightButtonDown" 
			  MouseLeftButtonDown="LayoutRoot_MouseLeftButtonDown" >
        <Rectangle Height="55" VerticalAlignment="Top" Fill="#FF4C73A3">
            <Rectangle.Effect>
                <DropShadowEffect Color="#FFC4C4C4" ShadowDepth="2" Direction="300" Opacity="0.9" BlurRadius="3"/>
            </Rectangle.Effect>
        </Rectangle>


        <Grid x:Name="grdDash" RenderTransformOrigin="0.5,0.5" Background="White">
            <Grid.RenderTransform>
                <CompositeTransform/>
            </Grid.RenderTransform>


            <dashboard:AppMenuView x:Name="appMenuView" VerticalAlignment="Top"/>


            
                <!--<dashboard:DragCanvas x:Name="dgThumbnail"     Width="200"    Height="300"   Margin="0,150 ,10,0"  
                                  HorizontalAlignment="Right"  VerticalAlignment="Top"  
                                   Cursor="Hand"       >
                        
            
            
       
               
                        <Button      Content="aaaa"  ></Button>
               

            </dashboard:DragCanvas>-->
            
            
            
            
            <!--<Button x:Name="btnCanvasHeightx" Width="88" Click="btnCanvasHeight_Click" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,150 ,10,0" Padding="10,10,10,12">
                    <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
                        <Image Source="Images/arrow_next_right.png" HorizontalAlignment="Center" Width="48" RenderTransformOrigin="0.5,0.5">
                            <Image.RenderTransform>
                                <CompositeTransform Rotation="90"/>
                            </Image.RenderTransform>
                        </Image>
                        <TextBlock Text="Add Spacexxxx" HorizontalAlignment="Center" FontWeight="Bold"/>
                    </StackPanel>
                </Button>-->





            <ScrollViewer x:Name="scrollViewer" VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Auto" Background="Transparent" Padding="0" BorderBrush="{x:Null}" Margin="0,90,0,0" HorizontalAlignment="Left" VerticalAlignment="Top">
                <StackPanel  x:Name="DGBorder" >
                    <Button x:Name="btnCanvasWidth" Width="88" Click="btnCanvasWidth_Click" HorizontalAlignment="Right" VerticalAlignment="Bottom" Padding="10,10,10,12" Margin="0,0,10,-91">
                		<StackPanel Orientation="Vertical" HorizontalAlignment="Center">
                			<Image Source="Images/arrow_next_right.png" HorizontalAlignment="Center" Width="48" RenderTransformOrigin="0.5,0.5"/>
                			<TextBlock Text="Add Space" HorizontalAlignment="Center" FontWeight="Bold"/>
                		</StackPanel>
                	</Button>
                    <dashboard:DragCanvas x:Name="dgCanvas" Margin="0,4,0,0" Height="8000" Width="4000"  >
                        <StackPanel Orientation="Vertical"  x:Name="WelcomeStackPanel" Margin="10,25,0,0" VerticalAlignment="Top" >
                            <Grid x:Name="grdWelcome" Width="730" HorizontalAlignment="Center">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="0.9*"/>
                                    <ColumnDefinition Width="20"/>
                                </Grid.ColumnDefinitions>
                                <Border x:Name="border" BorderThickness="1" BorderBrush="#FF49428B " Background="#FF5C53AC" >
                                    <Border.Effect>
                                        <DropShadowEffect Color="#FF646161" ShadowDepth="2"/>
                                    </Border.Effect>
                                </Border>
                                <Path Style="{StaticResource PathStyle1}" Stroke="{x:Null}" VerticalAlignment="Top" Margin="-1,-1,0,0" Height="56" x:Name="Path" RenderTransformOrigin="0.483,0.73" Stretch="Fill" Data="M19.037445,68.87648 C18.651707,71.446381 18.651489,9.7744284 18.265808,8.8398733 L250.16826,7.8843799 C256.14966,8.0045338 266.32675,5.2318377 265.72806,11.176228L265.53519,33.181797 C159.32376,67.241753 42.156288,-8.9143219 19.166056,68.643394 z" 
            						UseLayoutRounding="False" Width="{Binding Width, ElementName=border}" Visibility="Collapsed">
                                    <Path.RenderTransform>
                                        <TransformGroup>
                                            <TranslateTransform X="0" Y="0"/>
                                            <ScaleTransform ScaleX="1" ScaleY="1"/>
                                            <SkewTransform AngleX="0" AngleY="0"/>
                                            <RotateTransform Angle="0"/>
                                            <TranslateTransform X="0" Y="0"/>
                                            <TranslateTransform X="0" Y="0"/>
                                        </TransformGroup>
                                    </Path.RenderTransform>
                                </Path>
                                <!--<Image HorizontalAlignment="Left" Margin="12,2,0,5" Source="../Images/clean.png" Stretch="Fill" Width="49" Height="49" d:IsEffectDisabled="True">
                                    <Image.Effect>
                                        <DropShadowEffect Color="#FF8B8585" ShadowDepth="1"/>
                                    </Image.Effect>
                                </Image>-->
                                <TextBlock x:Name="tbWelcome" Margin="15,7,156,32.2000114440918" TextWrapping="Wrap" Text="Welcome to Epi Info™ Cloud Data Analytics!" FontSize="18.667" Foreground="#ffffff " />
                                <TextBlock x:Name="tbMsg" Height="24" Margin="15,50,22,0" TextWrapping="Wrap" Text="Select a data source to begin analyzing your data." FontSize="14.667" VerticalAlignment="Top" Foreground="#ffffff"/>
                                <Button x:Name="btnDS" HorizontalAlignment="Right" Margin="0,40,34,13" Width="180" Background="#1d60ac" Cursor="Hand" Padding="4,2" Style="{StaticResource btnSec1}" VerticalAlignment="Top" Height="44" Click="btnDS_Click">
                                    <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4" Height="31">
                                        <Image Source="../Images/btnsetdb123.png" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="7,0,0,0" Width="31" Height="31"		/>
                                        <TextBlock Text="Set Data Source" Margin="7,0" Foreground="White"  VerticalAlignment="Center" FontSize="16" />
                                    </StackPanel>
                                </Button>
                                <TextBlock x:Name="tbMsg2" Height="24" Margin="149,77,542,0" TextWrapping="Wrap" Text="Or" FontSize="14.667" VerticalAlignment="Top" Foreground="#ffffff"/>
                                <TextBlock x:Name="tbMsg1" Height="24" Margin="15,100,22,0" TextWrapping="Wrap" Text="Open a dashboard to see saved analytics." FontSize="14.667" VerticalAlignment="Top" Foreground="#ffffff"/>
                                <Button x:Name="btnOpenDash" HorizontalAlignment="Right" Margin="0,90,34,13" Background="#1d60ac" Cursor="Hand" Width="180" Padding="4,2" Style="{StaticResource btnSec1}" VerticalAlignment="Top" Height="44"  Click="Open_Click"         >
                                    <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4" Height="31">
                                        <Image Source="../Images/open12.png" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="12,0,0,0" Width="31" Height="31"		/>
                                        <TextBlock Text="Open Dashboard" Margin="7,0" Foreground="White"  VerticalAlignment="Center" FontSize="16" />
                                    </StackPanel>
                                </Button>
                            </Grid>
                        </StackPanel>
                    </dashboard:DragCanvas>




                    <Button x:Name="btnCanvasHeight" Width="88" Click="btnCanvasHeight_Click" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="25,-142,0,0" Padding="10,10,10,12">
                        <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
                            <Image Source="Images/arrow_next_right.png" HorizontalAlignment="Center" Width="48" RenderTransformOrigin="0.5,0.5">
                                <Image.RenderTransform>
                                    <CompositeTransform Rotation="90"/>
                                </Image.RenderTransform>
                            </Image>
                            <TextBlock Text="Add Space" HorizontalAlignment="Center" FontWeight="Bold"/>
                        </StackPanel>
                    </Button>



                    <!--<Button x:Name="btnCanvasHeightx" Width="88" Click="btnCanvasHeight_Click" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,-112,10,0" Padding="10,10,10,12">
                        <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
                            <Image Source="Images/arrow_next_right.png" HorizontalAlignment="Center" Width="48" RenderTransformOrigin="0.5,0.5">
                                <Image.RenderTransform>
                                    <CompositeTransform Rotation="90"/>
                                </Image.RenderTransform>
                            </Image>
                            <TextBlock Text="Add Spacexxxx" HorizontalAlignment="Center" FontWeight="Bold"/>
                        </StackPanel>
                    </Button>-->





                    <!--<Canvas    x:Name="thumb"     HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,-142,10,0"       >
                            <Button        Content="Hello"></Button>
                        </Canvas>-->


                </StackPanel>
            </ScrollViewer>
            <!--<dashboard:DataFilterControl x:Name="dfilter"></dashboard:DataFilterControl>-->
            <Grid    VerticalAlignment="Bottom" Margin="0,0,25,25" Height="28"     >
                <Grid.Effect>
                    <DropShadowEffect Color="#FFC4C4C4" ShadowDepth="2" Direction="38" Opacity="0.9" BlurRadius="3"/>
                </Grid.Effect>
                <Image HorizontalAlignment="Right" Margin="0" Source="Images/secondary_bar.png" Stretch="Fill" RenderTransformOrigin="0.5,0.5" >
                    <Image.RenderTransform>
                        <CompositeTransform Rotation="180"/>
                    </Image.RenderTransform>
                </Image>
                <StackPanel HorizontalAlignment="Right" Margin="0,1,17,0" Orientation="Horizontal" VerticalAlignment="Center">
                    <TextBlock x:Name="txtZoom" TextWrapping="Wrap" Text="Zoom:" VerticalAlignment="Center" Padding="0,1,0,0" Margin="0,2,5,0" Height="18"/>
                    <Button x:Name="btnZoomReset" Content="Button" Width="20" Style="{StaticResource ZoomReset}" VerticalAlignment="Center" Margin="0,0,5,-3" Cursor="Hand" Click="btnZoomReset_Click" Height="18"/>
                    <Button x:Name="btnZoomOut" Content="Button" Width="20" Style="{StaticResource ZoomOut}" VerticalAlignment="Center" Margin="0,0,5,-3" Cursor="Hand" Click="btnZoomOut_Click" Height="18"/>
                    <!--<Button x:Name="ZoomToggle"   Width="40" Height="20"     Click="ZoomToggle_Click" >Toggle Zoom</Button>-->
                    <Slider x:Name="zoom_slider"   ValueChanged="zoom_slider_ValueChanged" 
    					Minimum="-3" Maximum="3"    MouseEnter="zoom_slider_MouseEnter"  MouseLeave="zoom_slider_MouseLeave" Height="18" Width="150" VerticalAlignment="Center" Margin="0,0,0,-3"   />
                    <Button x:Name="btnZoomIn" Content="Button" Width="20" Style="{StaticResource ZoomIn}" VerticalAlignment="Center" Margin="5,0,5,-3" Cursor="Hand" Click="btnZoomIn_Click" Height="18"/>
                    <Button x:Name="btnFullScreen" Content="Button" Width="18" Style="{StaticResource FullScreen}" VerticalAlignment="Center" Margin="10,0,5,-3" Cursor="Hand" Height="16" ToolTipService.ToolTip="Full Screen Mode"     />
                </StackPanel>
                <TextBlock x:Name="tbTitle" HorizontalAlignment="Left" TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Center" Visibility="Collapsed"/>
            </Grid>



            <Grid HorizontalAlignment="Left"    VerticalAlignment="Bottom" x:Name="grdDF" Margin="0,0,0,50"  MinHeight="750"   >
                <!--<dashboard:DataFilterControl x:Name="dFilter"></dashboard:DataFilterControl>-->



            </Grid>


            <Border x:Name="brDashboardTitle" BorderThickness="1" HorizontalAlignment="Right" VerticalAlignment="Top" CornerRadius="10" Padding="0,5" Margin="0,56,13,0">
                <StackPanel x:Name="spWelcome" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right">
                    <!--<TextBlock TextWrapping="Wrap" Text="Dashboard Title:" VerticalAlignment="Center" Margin="0" HorizontalAlignment="Left" FontFamily="Segoe UI" FontSize="12" FontWeight="Normal"/>
        		<TextBlock x:Name="tbDashboardTitle" TextWrapping="Wrap" Text="Dashboard Title Name" VerticalAlignment="Center" HorizontalAlignment="Left" FontFamily="Segoe UI" FontSize="12" FontWeight="Bold" Margin="5,0,0,0"/>-->
                    <Image Source="Images/user.png" Margin="0,-4,4,0" Width="16" Height="16" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                    <TextBlock x:Name="tbUser" TextWrapping="Wrap" Text="Welcome First Name" VerticalAlignment="Center" TextTrimming="WordEllipsis" HorizontalAlignment="Left" Margin="0,-2,0,0" />
                    <TextBlock TextWrapping="Wrap"   x:Name="linkAdmin_sep" Text="  |  " VerticalAlignment="Center" Width="16" HorizontalAlignment="Left" Margin="0,-2,0,0" />
                    <HyperlinkButton x:Name="linkAdmin" Content="Site Administration" HorizontalAlignment="Left"  Click="admin_click"  Margin="0,-2,0,0" Canvas.ZIndex="1" VerticalAlignment="Center" Style="{StaticResource LinKWhite}" FontFamily="Segoe UI" FontWeight="Normal" FontSize="13.333"/>
                    <TextBlock Height="20" x:Name="linkLogout_sep" TextWrapping="Wrap" Text="  |  " VerticalAlignment="Center" Width="16" HorizontalAlignment="Left" Margin="0,-2,0,0" />
                    <HyperlinkButton x:Name="linkLogout" Content="Log Out"        
                                     HorizontalAlignment="Left"   Click="logout_Click"  
                                     Margin="0,-2,0,0" Canvas.ZIndex="1" 
                                     VerticalAlignment="Center" Height="20" Style="{StaticResource LinKWhite}" FontFamily="Segoe UI" FontSize="13.333" FontWeight="Normal"/>
                </StackPanel>
            </Border>
            <Button x:Name="btnGadgetMenu" HorizontalAlignment="Center" Background="#FF00B050" Padding="1" Style="{StaticResource btnprimary}" VerticalAlignment="Top" Margin="0,54,0,0" Click="spButtons_MouseEnter" Cursor="Hand" Visibility="Collapsed">
                <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,2">
                    <TextBlock Text="Gadget Menu" Margin="2,0,0,0" Foreground="White" VerticalAlignment="Center" FontSize="16" FontWeight="Bold" />
                    <Image Source="Images/arrow_next_right.png" HorizontalAlignment="Left" VerticalAlignment="Center" Width="16" Height="16" Margin="3,0,0,0" RenderTransformOrigin="0.5,0.5"		>
                        <Image.RenderTransform>
                            <CompositeTransform Rotation="90"/>
                        </Image.RenderTransform>
                    </Image>
                </StackPanel>
            </Button>
            <Border x:Name="spButtons" HorizontalAlignment="Center" Margin="0,80,0,0" Background="#FF5C53AC" BorderBrush="#FF49428B" BorderThickness="1" Padding="10" VerticalAlignment="Top" Height="228" Visibility="Collapsed">
                <sdk:TabControl BorderThickness="1" Padding="10" Width="443" BorderBrush="#FF00AADE">
                    <!--<sdk:TabItem x:Name="tabG" Header="Gadgets" Margin="0,0,0,-1">
                        <dashboard:GadgetNamesContainer  Width="400" Height="300" />
                    </sdk:TabItem>-->
                    <sdk:TabItem x:Name="tabGadgets" Header="Gadgets" Margin="0,0,0,-1">
                        <Grid Background="White">
                            <toolkit:WrapPanel Orientation="Horizontal" VerticalAlignment="Top">
                                <Button x:Name="LineList" HorizontalAlignment="Center" Background="#FF00B050" Padding="1" Style="{StaticResource btnPriGreen}" Height="75" VerticalAlignment="Top"  Click="GadgetSelectedEventHandler" Cursor="Hand">
                                    <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,2">
                                        <TextBlock Text="Line List" TextWrapping="Wrap" Margin="2,0,0,0" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" Width="70" TextAlignment="Center" />
                                    </StackPanel>
                                </Button>
                                <Button x:Name="FrequencyControl" HorizontalAlignment="Center" Background="#FF00B050" Padding="1" Style="{StaticResource btnPriGreen}" Height="75" VerticalAlignment="Top" Click="GadgetSelectedEventHandler" Cursor="Hand">
                                    <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,2">
                                        <TextBlock Text="Frequency" Margin="2,0,0,0" Foreground="White" VerticalAlignment="Center" TextAlignment="Center" HorizontalAlignment="Center" Width="70" Height="17.7333335876465" />
                                    </StackPanel>
                                </Button>
                                <Button x:Name="CombinedFrequency" HorizontalAlignment="Center" Background="#FF00B050" Padding="1" Style="{StaticResource btnPriGreen}" VerticalAlignment="Top" Height="75"  Click="GadgetSelectedEventHandler" Cursor="Hand">
                                    <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,2">
                                        <TextBlock Text="Combined Frequency" TextWrapping="Wrap" Margin="2,0,0,0" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" Width="70" TextAlignment="Center" Height="35.466667175293" />
                                    </StackPanel>
                                </Button>
                                <Button x:Name="AberrationControl" HorizontalAlignment="Center" Background="#FF00B050" Padding="1" Style="{StaticResource btnPriGreen}" VerticalAlignment="Top" Height="75"  Click="GadgetSelectedEventHandler" Cursor="Hand">
                                    <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,2">
                                        <TextBlock Text="Aberration Detection" TextWrapping="Wrap" Margin="2,0,0,0" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" Width="70" TextAlignment="Center" Height="35.466667175293" />
                                    </StackPanel>
                                </Button>
                                <Button x:Name="TwoxTwoTableControl" HorizontalAlignment="Center" Background="#FF00B050" Padding="1" Style="{StaticResource btnPriGreen}" Height="75" VerticalAlignment="Top"  Click="GadgetSelectedEventHandler" Cursor="Hand">
                                    <StackPanel VerticalAlignment="Top" HorizontalAlignment="Center" Margin="4,2">
                                        <TextBlock Text="2 x 2 Table" Margin="2,0,0,0" Foreground="White" VerticalAlignment="Top" TextAlignment="Center" HorizontalAlignment="Center" Width="70" Height="17.7333335876465" />
                                    </StackPanel>
                                </Button>
                                <Button x:Name="MxNTableControl" HorizontalAlignment="Center" Background="#FF00B050" Padding="1" Style="{StaticResource btnPriGreen}" VerticalAlignment="Top" Height="75"  Click="GadgetSelectedEventHandler" Cursor="Hand">
                                    <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,2">
                                        <TextBlock Text="M x N Table" Margin="2,0,0,0" Foreground="White" VerticalAlignment="Center" TextAlignment="Center" HorizontalAlignment="Center" Width="70" Height="17.7333335876465" />
                                    </StackPanel>
                                </Button>
                                <Button x:Name="MeansControl" HorizontalAlignment="Center" Background="#FF00B050" Padding="1" Style="{StaticResource btnPriGreen}" Height="75" VerticalAlignment="Top"  Click="GadgetSelectedEventHandler" Cursor="Hand">
                                    <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,2">
                                        <TextBlock Text="Means" Margin="2,0,0,0" Foreground="White" VerticalAlignment="Center" TextAlignment="Center" HorizontalAlignment="Center" Width="70" Height="17.7333335876465" />
                                    </StackPanel>
                                </Button>
                                <Button x:Name="LogisticRegression" HorizontalAlignment="Center" Background="#FF00B050" Padding="1" Style="{StaticResource btnPriGreen}" VerticalAlignment="Top" Height="75"  Click="GadgetSelectedEventHandler" Cursor="Hand">
                                    <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,2">
                                        <TextBlock Text="Logistic Regression" TextWrapping="Wrap" Margin="2,0,0,0" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" Width="70" TextAlignment="Center" Height="35.466667175293" />
                                    </StackPanel>
                                </Button>
                                <Button x:Name="LinearRegression" HorizontalAlignment="Center" Background="#FF00B050" Padding="1" Style="{StaticResource btnPriGreen}" Height="75" VerticalAlignment="Top"  Click="GadgetSelectedEventHandler" Cursor="Hand">
                                    <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,2">
                                        <TextBlock Text="Linear Regression" TextWrapping="Wrap" Margin="2,0,0,0" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" Width="70" Height="35.466667175293" TextAlignment="Center" />
                                    </StackPanel>
                                </Button>
                                <Button x:Name="MapControl" HorizontalAlignment="Center" Background="#FF00B050" Padding="1" Style="{StaticResource btnPriGreen}" Height="75" VerticalAlignment="Top" Cursor="Hand"  Click="GadgetSelectedEventHandler">
                                    <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,2">
                                        <TextBlock Text="Case Cluster Map" TextWrapping="Wrap" Margin="2,0,0,0" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" Width="70" TextAlignment="Center" />
                                    </StackPanel>
                                </Button>
                            </toolkit:WrapPanel>
                        </Grid>
                    </sdk:TabItem>
                    <sdk:TabItem x:Name="tabCharts" Header="Charts" Margin="0,0,0,-1">
                        <Grid Background="#FFFFFEFE">
                            <toolkit:WrapPanel Orientation="Horizontal" VerticalAlignment="Top">
                                <Button x:Name="EpiCurve" HorizontalAlignment="Center" Background="#FF00B050" Padding="1" Style="{StaticResource btnPriGreen}" Height="75" d:LayoutOverrides="Height" VerticalAlignment="Top"  Click="GadgetSelectedEventHandler" Cursor="Hand" >
                                    <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,2">
                                        <TextBlock Text="Epi Curve" Margin="2,0,0,0" Foreground="White" VerticalAlignment="Center" TextAlignment="Center" HorizontalAlignment="Center" Width="70" Height="17.7333335876465" />
                                    </StackPanel>
                                </Button>
                                <Button x:Name="Scatter" HorizontalAlignment="Center" Background="#FF00B050" Padding="1" Style="{StaticResource btnPriGreen}" Height="75" d:LayoutOverrides="Height" VerticalAlignment="Top"  Click="GadgetSelectedEventHandler" Cursor="Hand" >
                                    <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,2">
                                        <TextBlock Text="Scatter" Margin="2,0,0,0" Foreground="White" VerticalAlignment="Center" TextAlignment="Center" HorizontalAlignment="Center" Width="70" Height="17.7333335876465" />
                                    </StackPanel>
                                </Button>
                                <Button x:Name="StackedColumn" HorizontalAlignment="Center" Background="#FF00B050" Padding="1" Style="{StaticResource btnPriGreen}" VerticalAlignment="Top" Height="75" Tag="XYChartControl"  Click="GadgetSelectedEventHandler" Cursor="Hand">
                                    <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,2">
                                        <TextBlock Text="Stacked Column" TextWrapping="Wrap" Margin="2,0,0,0" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" Width="70" TextAlignment="Center" Height="35.466667175293" />
                                    </StackPanel>
                                </Button>
                                <Button x:Name="Column" HorizontalAlignment="Center" Background="#FF00B050" Padding="1" Style="{StaticResource btnPriGreen}" VerticalAlignment="Top" Height="75" Tag="XYChartControl"  Click="GadgetSelectedEventHandler" Cursor="Hand">
                                    <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,2">
                                        <TextBlock Text="Column" Margin="2,0,0,0" Foreground="White" VerticalAlignment="Center" TextAlignment="Center" HorizontalAlignment="Center" Width="70" Height="17.7333335876465" />
                                    </StackPanel>
                                </Button>
                                <Button x:Name="Bar" HorizontalAlignment="Center" Background="#FF00B050" Padding="1" Style="{StaticResource btnPriGreen}" VerticalAlignment="Top" Height="75" Tag="XYChartControl"  Click="GadgetSelectedEventHandler" Cursor="Hand">
                                    <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,2">
                                        <TextBlock Text="Bar" Margin="2,0,0,0" Foreground="White" VerticalAlignment="Center" TextAlignment="Center" HorizontalAlignment="Center" Width="70" Height="17.7333335876465" />
                                    </StackPanel>
                                </Button>
                                <Button x:Name="Line" HorizontalAlignment="Center" Background="#FF00B050" Padding="1" Style="{StaticResource btnPriGreen}" VerticalAlignment="Top" Height="75" Tag="XYChartControl"   Click="GadgetSelectedEventHandler" Cursor="Hand">
                                    <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,2">
                                        <TextBlock Text="Line" Margin="2,0,0,0" Foreground="White" VerticalAlignment="Center" TextAlignment="Center" HorizontalAlignment="Center" Width="70" Height="17.7333335876465" />
                                    </StackPanel>
                                </Button>
                                <Button x:Name="Pie" HorizontalAlignment="Center" Background="#FF00B050" Padding="1" Style="{StaticResource btnPriGreen}" VerticalAlignment="Top" Height="75" Tag="XYChartControl"  Click="GadgetSelectedEventHandler" Cursor="Hand">
                                    <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,2">
                                        <TextBlock Text="Pie" Margin="2,0,0,0" Foreground="White" VerticalAlignment="Center" TextAlignment="Center" HorizontalAlignment="Center" Width="70" Height="17.7333335876465" />
                                    </StackPanel>
                                </Button>
                                <Button x:Name="Pareto" HorizontalAlignment="Center" Background="#FF00B050" Padding="1" Style="{StaticResource btnPriGreen}" VerticalAlignment="Top" Height="75" Tag="XYChartControl"  Click="GadgetSelectedEventHandler" Cursor="Hand">
                                    <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,2">
                                        <TextBlock Text="Pareto" Margin="2,0,0,0" Foreground="White" VerticalAlignment="Center" TextAlignment="Center" HorizontalAlignment="Center" Width="70" Height="17.7333335876465" />
                                    </StackPanel>
                                </Button>
                            </toolkit:WrapPanel>
                        </Grid>
                    </sdk:TabItem>
                    <sdk:TabItem x:Name="tabStatCalc" Header="StatCalc Calculator" Margin="0,0,0,-1">
                        <Grid Background="White">
                            <toolkit:WrapPanel Orientation="Horizontal" VerticalAlignment="Top">
                                <Button x:Name="TwoByTwoSC" HorizontalAlignment="Center" Background="#FF00B050" Padding="1" Style="{StaticResource btnPriGreen}" VerticalAlignment="Top" Height="75"  Click="GadgetSelectedEventHandler" Cursor="Hand">
                                    <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,2">
                                        <TextBlock Text="Tables (2x2xn)" Margin="2,0,0,0" Foreground="White" VerticalAlignment="Center" TextAlignment="Center" HorizontalAlignment="Center" Width="70" TextWrapping="Wrap"/>
                                    </StackPanel>
                                </Button>
                                <Button x:Name="Binomial" HorizontalAlignment="Center" Background="#FF00B050" Padding="1" Style="{StaticResource btnPriGreen}" Height="75" d:LayoutOverrides="Height" VerticalAlignment="Top"  Click="GadgetSelectedEventHandler" Cursor="Hand">
                                    <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,2">
                                        <TextBlock Text="Binomial (Proportion vs. Std.)" Margin="2,0,0,0" Foreground="White" VerticalAlignment="Center" TextAlignment="Center" HorizontalAlignment="Center" Width="70" TextWrapping="Wrap" />
                                    </StackPanel>
                                </Button>
                                <Button x:Name="ChiSquare" HorizontalAlignment="Center" Background="#FF00B050" Padding="1" Style="{StaticResource btnPriGreen}" Height="75" VerticalAlignment="Top" d:LayoutOverrides="Height"  Click="GadgetSelectedEventHandler" Cursor="Hand">
                                    <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,2">
                                        <TextBlock Text="Chi Square for Trend" Margin="2,0,0,0" Foreground="White" VerticalAlignment="Center" TextAlignment="Center" HorizontalAlignment="Center" Width="70" TextWrapping="Wrap" />
                                    </StackPanel>
                                </Button>
                                <Button x:Name="Poisson" HorizontalAlignment="Center" Background="#FF00B050" Padding="1" Style="{StaticResource btnPriGreen}" Height="75" VerticalAlignment="Top" d:LayoutOverrides="Height" Click="GadgetSelectedEventHandler" Cursor="Hand">
                                    <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,2">
                                        <TextBlock Text="Poisson" Margin="2,0,0,0" Foreground="White" VerticalAlignment="Center" TextAlignment="Center" HorizontalAlignment="Center" Width="70" TextWrapping="Wrap" />
                                    </StackPanel>
                                </Button>
                                <Button x:Name="Cohort" HorizontalAlignment="Center" Background="#FF00B050" Padding="1" Style="{StaticResource btnPriGreen}" Height="75" VerticalAlignment="Top" d:LayoutOverrides="Height"  Click="GadgetSelectedEventHandler" Cursor="Hand">
                                    <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,2">
                                        <TextBlock Text="Cohort or Cross-sectional" Margin="2,0,0,0" Foreground="White" VerticalAlignment="Center" TextAlignment="Center" HorizontalAlignment="Center" Width="70" TextWrapping="Wrap" />
                                    </StackPanel>
                                </Button>
                                <Button x:Name="Unmatched" HorizontalAlignment="Center" Background="#FF00B050" Padding="1" Style="{StaticResource btnPriGreen}" Height="75" VerticalAlignment="Top" d:LayoutOverrides="Height"  Click="GadgetSelectedEventHandler" Cursor="Hand">
                                    <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,2">
                                        <TextBlock Text="Unmatched Case-control" Margin="2,0,0,0" Foreground="White" VerticalAlignment="Center" TextAlignment="Center" HorizontalAlignment="Center" Width="70" TextWrapping="Wrap" />
                                    </StackPanel>
                                </Button>
                                <Button x:Name="PopulationSurvey" HorizontalAlignment="Center" Background="#FF00B050" Padding="1" Style="{StaticResource btnPriGreen}" Height="75" VerticalAlignment="Top" d:LayoutOverrides="Height"  Click="GadgetSelectedEventHandler" Cursor="Hand">
                                    <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,2">
                                        <TextBlock Text="Population Survey" Margin="2,0,0,0" Foreground="White" VerticalAlignment="Center" TextAlignment="Center" HorizontalAlignment="Center" Width="70" TextWrapping="Wrap" />
                                    </StackPanel>
                                </Button>
                            </toolkit:WrapPanel>
                        </Grid>
                    </sdk:TabItem>
                </sdk:TabControl>
            </Border>
        </Grid>

        <Grid x:Name="grdAdmin" VerticalAlignment="Top" RenderTransformOrigin="0.5,0.5" Background="White" Visibility="Collapsed">
            <Grid.RenderTransform>
                <CompositeTransform/>
            </Grid.RenderTransform>
            <dashboard:AdminMenuView x:Name="adminMenuView" VerticalAlignment="Top"/>
            <Border x:Name="brDashboardTitleAdmin" BorderThickness="1" HorizontalAlignment="Right" VerticalAlignment="Top" CornerRadius="10" Padding="0,5" Margin="0,56,13,0">
                <StackPanel x:Name="spWelcomeAdmin" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center">
                    <Image Source="Images/user.png" Margin="0,-4,4,0" Width="16" Height="16" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                    <TextBlock x:Name="tbUserAdmin" TextWrapping="Wrap" Text="Welcome First Name" FontSize="13.333" VerticalAlignment="Center" TextTrimming="WordEllipsis" Height="20" HorizontalAlignment="Left" Margin="0,-2,0,0"/>
                    <TextBlock Height="20" TextWrapping="Wrap" Text="  |  " VerticalAlignment="Center" Width="16" FontSize="13.333"  HorizontalAlignment="Left" Margin="0,-2,0,0"/>
                    <HyperlinkButton x:Name="linkDash" Content="Dashboard" HorizontalAlignment="Left"  Click="dash_Click" FontSize="13.333" Margin="0,-2,0,0" Canvas.ZIndex="1" VerticalAlignment="Center" Height="20" Style="{StaticResource LinKWhite}"/>
                    <TextBlock Height="20" x:Name="linkLogout1_sep" TextWrapping="Wrap" Text="  |  " VerticalAlignment="Center" Width="16" FontSize="13.333" HorizontalAlignment="Left" Margin="0,-2,0,0"/>
                    <HyperlinkButton x:Name="linkLogout1" Content="Log Out" HorizontalAlignment="Left"  Click="logout_Click" FontSize="13.333" Margin="0,-2,0,0" Canvas.ZIndex="1" VerticalAlignment="Center" Height="20" Style="{StaticResource LinKWhite}"/>
                </StackPanel>
            </Border>

            <Grid x:Name="grdWelcomeAdmin" Width="730" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="10,100,0,0" Visibility="Visible">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="0.9*"/>
                    <ColumnDefinition Width="20"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="border1" BorderThickness="1" BorderBrush="#FF2D6F5C" Background="#FF41A186" >
                    <Border.Effect>
                        <DropShadowEffect Color="#FF646161" ShadowDepth="2"/>
                    </Border.Effect>
                </Border>
                <Path Style="{StaticResource PathStyle1}" Stroke="{x:Null}" VerticalAlignment="Top" Margin="-1,-1,0,0" Height="56" x:Name="Path1" RenderTransformOrigin="0.483,0.73" Stretch="Fill" Data="M19.037445,68.87648 C18.651707,71.446381 18.651489,9.7744284 18.265808,8.8398733 L250.16826,7.8843799 C256.14966,8.0045338 266.32675,5.2318377 265.72806,11.176228L265.53519,33.181797 C159.32376,67.241753 42.156288,-8.9143219 19.166056,68.643394 z" 
    								UseLayoutRounding="False" Width="{Binding Width, ElementName=border}" Visibility="Collapsed">
                    <Path.RenderTransform>
                        <TransformGroup>
                            <TranslateTransform X="0" Y="0"/>
                            <ScaleTransform ScaleX="1" ScaleY="1"/>
                            <SkewTransform AngleX="0" AngleY="0"/>
                            <RotateTransform Angle="0"/>
                            <TranslateTransform X="0" Y="0"/>
                            <TranslateTransform X="0" Y="0"/>
                        </TransformGroup>
                    </Path.RenderTransform>
                </Path>
                <Image HorizontalAlignment="Left" Margin="12,6,0,5" Source="../Images/Admin.png" Stretch="Fill" Width="36" Height="36" d:IsEffectDisabled="True">
                    <Image.Effect>
                        <DropShadowEffect Color="#FF8B8585" ShadowDepth="1"/>
                    </Image.Effect>
                </Image>
                <TextBlock x:Name="tbWelcomeAdmin" VerticalAlignment="Center" Margin="60,0,0,0" TextWrapping="Wrap" Text="Welcome to Epi Info Visualization Administration!" FontFamily="Segoe UI" FontSize="18.667" FontWeight="Normal"/>
                <!--<TextBlock x:Name="tbMsg" Height="24" Margin="60,28,22,11" TextWrapping="Wrap" Text="Select a data source from the drop-down menu at the top to begin analyzing your data." Style="{StaticResource DefaultTextBlockStyle}" FontSize="16"/>-->
            </Grid>


            <StackPanel x:Name="spAdminBox" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="10,80,0,0">
                <!--<dashboard:Organization x:Name="Org" VerticalAlignment="Top" Margin="0,55,0,0" Visibility="Collapsed" />-->
                <!--<dashboard:Users x:Name="Users" VerticalAlignment="Top" Margin="0,55,0,0" Visibility="Visible"/>-->
                <!--<dashboard:DataSources x:Name="DataSources" VerticalAlignment="Top" Margin="0,55,0,0" Visibility="Collapsed" />
                <dashboard:AddEditDataSources x:Name="AddEditDataSources" VerticalAlignment="Top" Margin="0,55,0,0"  Visibility="Collapsed" />-->

            </StackPanel>
       
           
            
            
        </Grid>



    </Grid>

</UserControl>    
    
    
    
    
    
    
    
